function f = fun(name,x,M,N,t)
switch name
    case {'DICF1'} 
        st = max(3.5-0.14*t,0.7+0.14*t);
        Wt = 2;
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
    case {'DICF1.1'} 
        st = max(3.5-0.14*t,0.7+0.14*t);
        Wt = 2;
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
    case {'ICF2'} 
        st = max(2.5-0.05*t,1.5+0.05*t);
        Wt = 2;
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
    case {'ICF3'}
        st = min(2.1+0.14*t,4.9-0.14*t);
        Wt = 2;
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
   case {'ICF4'} 
        st = min(2+0.05*t,3-0.05*t);
        Wt = 2;
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
     case {'DICF5'} 
        st = max(3.5-0.14*t,0.7+0.14*t);
        Wt = 6*sin(0.2*pi*(t+1));
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
     case {'DICF6'} 
        st = max(2.5-0.05*t,1.5+0.05*t);
        Wt = 6*sin(0.2*pi*(t+1));
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
     case {'DICF7'} 
        st = min(2.1+0.14*t,4.9-0.14*t);
        Wt = 6*sin(0.2*pi*(t+1));
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];    
    case {'DICF8'} 
        st = min(2+0.05*t,3-0.05*t);
        Wt = 6*sin(0.2*pi*(t+1));
        g = sum((x(2:N) - (1-0.9*sin(0.2*pi*t))).^2);
        f1 = (1+g) * (x(1)+0.05*sin(Wt*pi*x(1)));
        f2 = (1+g) * (st-x(1)+0.05*sin(Wt*pi*x(1)));
        f = [f1,f2];
end